package com.zyj.business.commonality.common;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.FileInputStream;

/**
 * @author yicky zhang
 * @create 2018-03-19 15:47
 * @desc
 **/

public interface BootstrapConfig {
    Logger logger = LoggerFactory.getLogger(BootstrapConfig.class);

    static void loadConfig() {
        try {
            FileInputStream fis = new FileInputStream(System.getProperty("user.home") + "/axinfu/config/zyj-business.properties");
            System.getProperties().load(fis);
            logger.info("load system config properties success." + JSON.toJSONString(System.getProperties(), SerializerFeature.PrettyFormat));
        } catch (Exception e) {
            logger.error("load system config properties error.", e);
        }
    }
}
